
#import "Reader.h"
#import <stdio.h>
#import <sys/file.h>

#import "MyObject.h"

@implementation MyObject

- init
{
	theReader = [[Reader alloc] init:"/dev/cufa" baudrate:9600];
	[theReader setAction:@selector(targetForReader:)];
	[theReader setTarget:self];
	[super init];
	return self;
}

- targetForReader:sender
{
	[theTextField setStringValue:[sender stringValue]];
	return self;
}

- appDidInit:sender
{
	[theTextField setStringValue:""];
	return self;
}

- appWillTerminate:sender
{
	[theReader closePort];
	[theReader free];
	return self;
}


@end;
